package com.szrt.java.day20170113.ch02;

import java.lang.reflect.Constructor;


public class ConstructorTest {
	
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void main(String[] args) throws Exception {
		
		Class clazz =Class.forName("com.szrt.java.day20170113.ch01.Student");
		
		//Class clazz = Student.class;
		Constructor constructor01 = clazz.getDeclaredConstructor(int.class,String.class,String.class);
		Constructor constructor02 = clazz.getDeclaredConstructor();
		
		Object student01 = constructor01.newInstance(1001001,"刘浩","15766472216");
		Object student02 = constructor02.newInstance();
		
		System.out.println(student01);
		System.out.println(student02);
		
	}

}
